/*
 * 
 */
package satir.card;

import java.util.*;
import satir.framework.LazyInitiator;

/**
 * The Class Deck act as a container of cards.
 * 
 * @version 2.0 March 2012
 * @author Chris Chan
 */
public class Deck {

	/** The cards. */
	private Stack<Card> cards;

	/**
	 * Instantiates a new deck.
	 */
	public Deck() {
		cards = new Stack<Card>();
	}
	
	/**
	 * Load card by using LazyInitiator.
	 * Will create a set of card according to the cardKey
	 *
	 * @param cardType the card type
	 * @param cardKeys the card keys
	 */
	public void loadCard(String cardType, String cardKeys[]){
		for(int i=0; i<cardKeys.length; i++){
			cards.push(LazyInitiator.getCard(cardType, cardKeys[i]));
		}
	}

	/**
	 * Draw card.
	 *
	 * @return the card on the top
	 */
	public Card drawCard() {
		return cards.pop();
	}

	/**
	 * Shuffle.
	 */
	public void shuffle() {
	}
}
